﻿using SanJ.FreeCare.ChargeItems;
using SanJ.FreeCare.ParticiPants;
using SanJ.FreeCare.TypeFramework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
using static Org.BouncyCastle.Crypto.Engines.SM2Engine;

namespace SanJ.FreeCare.Conditions
{
    /// <summary>
    /// Condition 每个实例代表一个特定的健康问题或医疗诊断
    /// </summary>
    public partial class Condition : AuditedAggregateRoot<Guid>,IMultiTenant, ISoftDelete
    {
        
        public List<ConditionRelation> ConditionRelations { get; set; }
        /// <summary>
        /// 临床状态
        /// active | recurrence | relapse | inactive | remission | resolved | unknown
        /// </summary>
        public string ClinicalStatusCode { get; private set; }

        /// <summary>
        /// 验证状态  
        /// nconfirmed | provisional | differential | confirmed | refuted | entered-in-error
        /// </summary>
        public string VerificationStatusCode { get; private set; }

        /// <summary>
        /// 条件分类   problem-list-item | encounter-diagnosis
        /// </summary>
        public string[] Category { get; private set; }

        /// <summary>
        /// 病情/诊断严重程度
        /// Severe  Moderate  Mild
        /// </summary>
        public string Severity { get; private set; }

        /// <summary>
        /// 条件的编码，通常使用标准化的代码系统，如 SNOMED CT、ICD-10 等
        /// </summary>
        public string Code { get; private set; }

        /// <summary>
        /// 描述该条件涉及的身体部位或组织
        /// </summary>
        public string[] BodySite { get; private set; }
        
        /// <summary>
        /// 与条件相关的主题，通常是患者或某种实体
        /// (Patient | Group)
        /// </summary>
        public string SubjectId { get; private set; }

        /// <summary>
        /// EncounterId
        /// </summary>
        public string EncounterId { get; private set; }

        /// <summary>
        /// 病情的时间  dateTime|Age|Period|Range|string
        /// </summary>
        public DateTime OnsetDateTime { get; private set; }

        /// <summary>
        /// 实际年龄
        /// </summary>
        public string OnsetAge { get; private set; }

        /// <summary>
        /// 条件缓解或者消失时间
        /// <summary>
        public DateTime AbatementDateTime { get; private set; }

        /// <summary>
        /// 记录时间
        /// </summary>
        public DateTime RecordedDate { get; private set; }

        /// <summary>
        /// 谁或什么参与了与病情相关的活动以及他们是如何参与的
        /// </summary>
        public ParticiPant[] ParticiPant { get; private set; }

        /// <summary>
        /// 描述条件的阶段性变化，通常在肿瘤诊断中使用
        /// </summary>
        public Stage[] Stage { get; private set; }

        /// <summary>
        /// 与条件相关的证据或依据，如检查结果、实验室数据等。
        /// </summary>
        public string[] EvidenceCodes { get; private set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Note { get; private set; }

        public bool IsDeleted { get; set; }

        public Guid? TenantId { get; set; }

        public Condition()
        {

        }
    }


}
